<?php
defined('SYSPATH') OR die('No direct access allowed.');
/**
 * mstjurusan.php
 * @author ranuandra
 *
 * 12 Mar 2012 13:35:48
 *
 * 
 */
class Model_Mstjurusan extends ORM
{
	
	protected $_belongs_to = array(
								'mstpendidikan' => array('model'	=> 'mstpendidikan'),
					
							);
	
	protected $_has_many = array(
			'mstpelamar' 		=> array('model'	=> 'mstpelamar'),
			'pelamarpendidikan'	=> array('model'	=> 'pelamarpendidikan'),
	);
	
	private $_field = array('jurusan', 'flag', 'mstpendidikan_id');
	private $_form = array('jurusan' => '', 'flag'=>'', 'mstpendidikan_id' => '');
	
	public $rules = array(
					'jurusan' => array(
									array('min_length', array(':value', 0)),
								),
					'flag' => array(
									array('min_length', array(':value', 0)),
								),
					'mstpendidikan_id' => array(
									array('min_length', array(':value', 0)),
								),
	);
	
	public function getField()
	{
		return $this->_field;
	}
	
	public function getForm()
	{
		return $this->_form;
		
	}
	
	public function create_data($values)
	{
	    return $this->values($values, $this->_field)->create();
	}
}